﻿using System;
using Microsoft.Practices.Composite.Presentation.Events;
using Centrica.Task.Model;

namespace Centrica.Task.App.View
{
    /// <summary>
    /// 
    /// </summary>
    class TaskNotificationEvent : CompositePresentationEvent<Centrica.Task.Model.Task>
    {
        public Centrica.Task.Model.Task Task { get; private set; }

        public TaskNotificationEvent()
        {
            this.Task = null;
        }

        public TaskNotificationEvent(Centrica.Task.Model.Task model)
        {
            this.Task = model;
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class TaskNewEvent : TaskNotificationEvent
    {
        public TaskNewEvent() : base()
        {
        }
        public TaskNewEvent(Centrica.Task.Model.Task task) : base(task)
        {
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class TaskUpdateEvent : TaskNotificationEvent
    {
        public TaskUpdateEvent() : base()
        {
        }
        public TaskUpdateEvent(Centrica.Task.Model.Task task) : base(task)
        {
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class TaskRemoveEvent : TaskNotificationEvent
    {
        public TaskRemoveEvent() : base()
        {
        }
        public TaskRemoveEvent(Centrica.Task.Model.Task task) : base(task)
        {
        }
    }

    /// <summary>
    /// 
    /// </summary>
    class TaskListEvent : CompositePresentationEvent<ITaskProvider>
    {
        public ITaskProvider TaskProvider { get; private set; }

        public TaskListEvent()
        {
            this.TaskProvider = null;
        }

        public TaskListEvent(ITaskProvider taskProvider)
        {
            this.TaskProvider = taskProvider;
        }
    }

}
